package com.dms.modules.merchant.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
@ApiModel(description = "商户创建数据传输对象")
public class MerchantCreateDTO {
    
    @ApiModelProperty("关联的用户ID（若不提供则创建新用户）")
    private Long userId;
    
    @NotBlank(message = "用户名不能为空")
    @Size(min = 4, max = 20, message = "用户名长度必须在4-20之间")
    @Pattern(regexp = "^[a-zA-Z0-9_]+$", message = "用户名只能包含字母、数字和下划线")
    @ApiModelProperty(value = "用户名", required = true)
    private String username;
    
    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 20, message = "密码长度必须在6-20之间")
    @ApiModelProperty(value = "密码", required = true)
    private String password;
    
    @NotBlank(message = "昵称不能为空")
    @Size(max = 50, message = "昵称长度不能超过50个字符")
    @ApiModelProperty(value = "昵称", required = true)
    private String nickname;
    
    @ApiModelProperty("头像URL")
    private String avatar;
    
    @Email(message = "邮箱格式不正确")
    @ApiModelProperty("邮箱")
    private String email;
    
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @ApiModelProperty("手机号")
    private String phone;
    
    @NotBlank(message = "店铺名称不能为空")
    @Size(max = 100, message = "店铺名称长度不能超过100个字符")
    @ApiModelProperty(value = "店铺名称", required = true)
    private String shopName;
    
    @ApiModelProperty("店铺logo URL")
    private String shopLogo;
    
    @ApiModelProperty("店铺描述")
    private String shopDesc;
    
    @ApiModelProperty("营业执照号码")
    private String businessLicense;
    
    @ApiModelProperty("营业执照图片URL")
    private String businessLicenseImage;
    
    @ApiModelProperty("法人姓名")
    private String legalPerson;
    
    @ApiModelProperty("法人身份证号")
    private String legalPersonIdCard;
    
    @ApiModelProperty("法人身份证正面照片URL")
    private String legalPersonIdCardFront;
    
    @ApiModelProperty("法人身份证背面照片URL")
    private String legalPersonIdCardBack;
    
    @ApiModelProperty("店铺地址")
    private String address;
    
    @ApiModelProperty("店铺公告")
    private String notice;
    
    @ApiModelProperty("营业时间")
    private String businessHours;
    
    @ApiModelProperty("售后政策")
    private String afterSalePolicy;
    
    @ApiModelProperty("店铺协议")
    private String shopAgreement;
} 